package com.uchengwang.ui.cm_ui.cycle.viewHolder;

import android.view.View;
import android.view.ViewStub;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.uchengwang.R;

/**
 * Created by U城网 on 2018/6/20.
 */

public class ArticleViewHolder extends CircleViewHolder{
    public LinearLayout article_ln;
    /** 文章的图片 */
    public ImageView article_cover;
    /** 文章的标题 */
    public TextView article_title;

    public ArticleViewHolder(View itemView){
        super(itemView, TYPE_ARTICLE);
    }

    @Override
    public void initSubView(int viewType, ViewStub viewStub) {
        if(viewStub == null){
            throw new IllegalArgumentException("viewStub is null...");
        }

        viewStub.setLayoutResource(R.layout.viewstub_article);
        View subViw  = viewStub.inflate();
        article_ln =  subViw.findViewById(R.id.article_ln);
        if(article_ln != null){
            article_cover =  subViw.findViewById(R.id.article_cover);
            article_title =  subViw.findViewById(R.id.article_title);
        }
    }
}
